package de.mindshareprojects.datawarehouse.shared;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.persistence.Column;

import com.google.gwt.user.client.rpc.IsSerializable;

@PersistenceCapable
public class Advertiser implements IsSerializable{

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@Column(name="id")
	private Long key;

	@Persistent
    private String advertiserName;

	@Persistent
	private Long advertiserGroupKey;
	
	private String advertiserGroupName;
	
    @Persistent
    private String country;

    @Persistent
    private Date creationDate;

    @Persistent
    private String foreignKey;
    
    
    @Persistent
    private String userName;
    
    @Persistent
    private Boolean webAnalytics;

	public Advertiser () {
    	this.creationDate = new Date();
    }
    
	public Advertiser (String advertiserName, String userName) {
    	this.creationDate = new Date();
    	this.advertiserName = advertiserName;
    	this.userName = userName;
    	
    }

    public String getAdvertiserName() {
		return advertiserName;
	}
    
	public String getCountry() {
		return country;
	}

	public Date getCreationDate() {
		return creationDate;
	}
	
	public String getForeignKey() {
		return foreignKey;
	}

	public Long getKey() {
		return key;
	}

	public String getUserName() {
		return userName;
	}
	

	public Boolean getWebAnalytics() {
		return webAnalytics;
	}

	public void setAdvertiserName(String advertiserName) {
		this.advertiserName = advertiserName;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public void setForeignKey(String foreignKey) {
		this.foreignKey = foreignKey;
	}

	public void setKey(Long key) {
    	this.key = key;
    }

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public void setWebAnalytics(Boolean webAnalytics) {
		this.webAnalytics = webAnalytics;
	}

	public Long getAdvertiserGroupKey() {
		return advertiserGroupKey;
	}

	public void setAdvertiserGroupKey(Long advertiserGroupKey) {
		this.advertiserGroupKey = advertiserGroupKey;
	}

	public String getAdvertiserGroupName() {
		return advertiserGroupName;
	}

	public void setAdvertiserGroupName(String advertiserGroupName) {
		this.advertiserGroupName = advertiserGroupName;
	}
    
}
